package com.agilegroup.crm.database;

import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;

public class ContactsSQLiteHelper extends SQLiteOpenHelper{

	public ContactsSQLiteHelper(Context context) {
	       super(context, "salesforce", null, 1);
	   }
	
	@Override
	   public void onCreate(SQLiteDatabase db) {
	       db.execSQL("CREATE TABLE contacts (_id INTEGER PRIMARY KEY AUTOINCREMENT, contactId TEXT NOT NULL, isSync TEXT NOT NULL);");
	   }
	
	 @Override
	   public void onUpgrade(SQLiteDatabase db, int oldVer, int newVer) {
	       db.execSQL("DROP TABLE IF EXISTS contacts");
	       onCreate(db);
	   }
}
